package com.xgp.labblogaffter.mapper;

import com.xgp.labblogaffter.model.Msg;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface MsgMapperExt {

    @Update("update msg set supcount = supcount + 1 where mid = #{id}")
    void addSupCountById(Integer id);

    @Select("select * from msg")
    List<Msg> findMsgAll();

    @Select("SELECT COUNT(*) FROM msg")
    long MsgCount();
}
